package com.opd.soeghtool;

public final class ISPCmd_Con {
    private ISPCmd_Con() {}
    public static final int VendorID = 0x0451;//8457;
    public static final int ProductID = 0x3F00;//30264;
    public static final int CMD_GET_VERSION     = 0x000000A6;
    public static final int CMD_UPDATE_APROM		= 0x000000A0;
    public static final int CMD_SYNC_PACKNO		= 0x000000A4;
    public static final int CMD_UPDATE_CONFIG   = 0x000000A1;
    public static final int CMD_UPDATE_WOERASE	= 0x000000C2;
    public static final int CMD_READ_CHECKSUM 	= 0x000000C8;
    public static final int CMD_WRITE_CHECKSUM	= 0x000000C9;
    public static final int CMD_ERASE_ALL 	    = 0x000000A3;
    public static final int CMD_READ_CONFIG     = 0x000000A2;
    public static final int CMD_APROM_SIZE      = 0x000000AA;
    public static final int CMD_GET_DEVICEID    = 0x000000B1;
    public static final int CMD_GET_FLASH_DID	= 0x000000B2;
    public static final int CMD_GET_DEVICEMODEL    = 0x000000B3;
    public static final int CMD_GET_OPD_VER    = 0x000000B5;
    public static final int CMD_RUN_APROM		= 0x000000AB;
    public static final int CMD_RUN_LDROM		= 0x000000AC;
    public static final int CMD_RESET			= 0x000000AD;
    public static final int CMD_CONNECT			= 0x000000AE;
    public static final int CMD_UPDATE_DATAFLASH = 0x000000C3;
    public static final int CMD_CLR_UPDATE_FLAG = 0x000000D1;
    public static final int CMD_GET_CHECKSUM = 0x000000D2;
    public static final int CMD_RESEND_PACKET   = 0x000000FF;

    /* General definition for NuMicro-M */
    public static final int NUMICRO_M0_FLASH_APROM_ADDR	 =	0x00000000;
    public static final int NUMICRO_M0_FLASH_LDROM_ADDR	=	0x00100000;
    public static final int NUMICRO_M0_FLASH_SPROM_ADDR =		0x00200000;
    public static final int NUMICRO_M0_FLASH_CONFIG_ADDR =	0x00300000;
    public static final int NUMICRO_M0_FLASH_PAGE_SIZE=		512;

    public static final int  NUC1XX_FLASH_CONFIG_DFVSEN	=	0x00000004;
    public static final int  NUC1XX_FLASH_CONFIG_LOCK=		0x00000002;
    public static final int  NUC1XX_FLASH_CONFIG_DFEN=		0x00000001;
    public static final int  NUC1XX_FLASH_CONFIG_DFBA=		0x0001FE00;
    public static final int  M0564_FLASH_SPROM_SIZE=          0x800;

    public static final int EPS_OK = 0;
    // Thread_CheckUSBConnect
    public static final int EPS_ERR_OPENPORT = 1;
    public static final int EPS_ERR_CONNECT = 2;
    // Thread_ProgramFlash
    public static final int EPS_ERR_ERASE = 8;
    public static final int EPS_ERR_CONFIG = 3;
    public static final int EPS_ERR_APROM = 4;
    public static final int EPS_ERR_NVM = 5;
    public static final int EPS_ERR_SIZE = 6;
    public static final int  EPS_PROG_DONE = 7;
    public static final int MAX_BUFFER_SIZE = 64;
}
